package jp.co.jalinfotec.sxt.dto;

/** DTO for user info. */
public class UserDto {
	
	/** User ID */
	private String id;
	
	/**
	 * [Setter]User ID
	 * @param id User ID
	 */
	public void setId(String id) { this.id = id; }

	/**
	 * [Getter]User ID
	 * @return User ID
	 */
	public String getId() { return this.id; }
	
	/** User Name */
	private String name;
	
	/**
	 * [Setter]User Name
	 * @param name User Name
	 */
	public void setName(String name) { this.name = name; }

	/**
	 * [Getter]User Name
	 * @return User Name
	 */
	public String getName() { return this.name; }
	
	/** Password */
	private String password;
	
	/**
	 * [Setter]Password
	 * @param password Password
	 */
	public void setPassword(String password) { this.password = password; }

	/**
	 * [Getter]Password
	 * @return Password
	 */
	public String getPassword() { return this.password; }
	
	/** Default Constructor */
	public UserDto(){}

	/**
	 * Constructor
	 * @param id User ID
	 * @param name User Name
	 * @param password Password
	 */
	public UserDto(String id, String name, String password){
		this.id = id;
		this.name = name;
		this.password = password;
	}
	
	/**
	 * override of Equals method
	 * @param userDto DTO
	 * @return when equals, return true.
	 */
	public boolean equals(UserDto userDto){
		return this.id.equals(userDto.getId())
				&& this.password.equals(userDto.getPassword());
	}
}
